#include <stdio.h>

const int nBufferSize = 5; 

int main () {
	printf ("const example");
	int arr [nBufferSize] = {1, 2, 3, 4, 5};
	for (int i = 0; i<nBufferSize; i++){
		printf ("arr[%d] = %d\n", i, arr [i]);
	}
	
	return 0;
}

/*
 *	output
 *
 [sgupta@rhel6x86 const]$ make
gcc -g -O0 -D_THREAD_SAFE -Wextra -pedantic -Wall -c -fPIC -Wno-deprecated  main.c
main.c: In function ‘main’:
main.c:7: warning: ISO C90 forbids variable length array ‘arr’
main.c:7: error: variable-sized object may not be initialized
main.c:7: warning: excess elements in array initializer
main.c:7: warning: (near initialization for ‘arr’)
main.c:7: warning: excess elements in array initializer
main.c:7: warning: (near initialization for ‘arr’)
main.c:7: warning: excess elements in array initializer
main.c:7: warning: (near initialization for ‘arr’)
main.c:7: warning: excess elements in array initializer
main.c:7: warning: (near initialization for ‘arr’)
main.c:7: warning: excess elements in array initializer
main.c:7: warning: (near initialization for ‘arr’)
main.c:7: warning: ISO C90 forbids mixed declarations and code
main.c:8: error: ‘for’ loop initial declarations are only allowed in C99 mode
main.c:8: note: use option -std=c99 or -std=gnu99 to compile your code
make: *** [main.o] Error 1
[sgupta@rhel6x86 const]$ 
 */
